import type { VbenFormSchema } from '@vben/common-ui';

import { getDictOptions } from '#/utils/dict';

export const customerSearchFormSchema: VbenFormSchema[] = [
  { fieldName: 'customerName', label: '客户姓名', component: 'Input' },
  { fieldName: 'newStaffName', label: '新服务员工', component: 'Input' },
  { fieldName: 'newStoreName', label: '新归属店铺', component: 'Input' },
];

export const customerHistoryColumns: BasicColumn[] = [
  { title: '客户姓名', dataIndex: 'customerName', width: 120 },
  {
    title: '转移类型',
    dataIndex: 'transferType',
    width: 120,
    dictType: 'hm_transfer_type',
  },
  { title: '原服务员工', dataIndex: 'oldStaffName', width: 120 },
  { title: '新服务员工', dataIndex: 'newStaffName', width: 120 },
  { title: '原归属店铺', dataIndex: 'oldStoreName', width: 150 },
  { title: '新归属店铺', dataIndex: 'newStoreName', width: 150 },
  { title: '操作人', dataIndex: 'operatorName', width: 120 },
  { title: '转移时间', dataIndex: 'createTime', width: 180 },
  {
    title: '状态',
    dataIndex: 'status',
    width: 100,
    dictType: 'hm_transfer_status',
  }, // 0=正常;1=已撤销
];

export const orderSearchFormSchema: VbenFormSchema[] = [
  { fieldName: 'customerName', label: '客户姓名', component: 'Input' },
  { fieldName: 'saleOrderId', label: '订单ID', component: 'InputNumber' },
  { fieldName: 'newSaleUserName', label: '新服务员工', component: 'Input' },
];

export const orderHistoryColumns: BasicColumn[] = [
  { title: '订单ID', dataIndex: 'saleOrderId', width: 180 },
  { title: '客户姓名', dataIndex: 'customerName', width: 120 },
  { title: '原服务员工', dataIndex: 'oldSaleUserName', width: 120 },
  { title: '新服务员工', dataIndex: 'newSaleUserName', width: 120 },
  { title: '原归属店铺', dataIndex: 'oldSaleDeptName', width: 150 },
  { title: '新归属店铺', dataIndex: 'newSaleDeptName', width: 150 },
  { title: '操作人', dataIndex: 'operatorName', width: 120 },
  { title: '转移时间', dataIndex: 'createTime', width: 180 },
  {
    title: '状态',
    dataIndex: 'status',
    width: 100,
    dictType: 'hm_transfer_status',
  },
];

export const todoSearchFormSchema: VbenFormSchema[] = [
  { fieldName: 'customerName', label: '客户姓名', component: 'Input' },
  { fieldName: 'todoId', label: '待办ID', component: 'InputNumber' },
  { fieldName: 'newTodoPersonName', label: '新待办人', component: 'Input' },
];

export const todoHistoryColumns: BasicColumn[] = [
  { title: '待办ID', dataIndex: 'todoId', width: 180 },
  { title: '客户姓名', dataIndex: 'customerName', width: 120 },
  { title: '原待办人', dataIndex: 'oldTodoPersonName', width: 120 },
  { title: '新待办人', dataIndex: 'newTodoPersonName', width: 120 },
  { title: '操作人', dataIndex: 'operatorName', width: 120 },
  { title: '转移时间', dataIndex: 'createTime', width: 180 },
  {
    title: '状态',
    dataIndex: 'status',
    width: 100,
    dictType: 'hm_transfer_status',
  },
];
